package com.gopay.common.cps.manager.gsrt.impl;
import java.util.Date;
import javax.annotation.Resource;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;
import com.gopay.common.cps.dao.gsrt.GsrtTenderBidstateSubDao;
import com.gopay.common.cps.manager.gsrt.GsrtTenderBidstateSubQueryManager;
import com.gopay.common.domain.gsrt.GsrtCustTenderMaster;
import com.gopay.common.domain.gsrt.GsrtTenderBidstateSub;
@Repository("gsrtTenderBidstateSubQueryManager")
public class GsrtTenderBidstateSubQueryManagerImpl implements GsrtTenderBidstateSubQueryManager {
    @Resource(name = "gsrtTenderBidstateSubDao")
    private GsrtTenderBidstateSubDao gsrtTenderBidstateSubDao;
	@Override
	public void save(GsrtTenderBidstateSub vo) {
		gsrtTenderBidstateSubDao.save(vo);

	}
	@Override
    @Transactional
	public void  saveGsrtTender(GsrtCustTenderMaster master){
		GsrtTenderBidstateSub subvo=new GsrtTenderBidstateSub();
		subvo.setBidState(master.getBidState());
		subvo.setCustTenderMasterId(master.getId());
		subvo.setRemark(master.getRemark());
		subvo.setCreatedTs(new Date());
		subvo.setLastUpdTs(new Date());
		this.save(subvo);
	}

}
